﻿@model VideoCache.Server.MVCWeb.Areas.Member.Models.NetbarModel

@{
    ViewBag.Title = "网吧资料";
    Layout = "~/Areas/Member/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>
@section script
{
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.locationselect.js")" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
    $.locationSelect("Province", "City");
    })
</script>
}

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.Id)
<table class="table-form">
<tr>
    <td class="label">@Html.LabelFor(model => model.Name)</td>
    <td>
        @Html.EditorFor(model => model.Name)
        @Html.ValidationMessageFor(model => model.Name)
    </td>
</tr>
<tr>
    <td class="label">详细地址</td>
    <td>
        <select id="Province" name="Province" value="@(Model != null ? Model.Province : "0")"></select>
        <select id="City" name="City" value="@(Model != null ? Model.City : "0")"></select>
        <div style="padding: 10px 0 10px 0">
        @Html.EditorFor(model => model.Address)
        @Html.ValidationMessageFor(model => model.Province)
        @Html.ValidationMessageFor(model => model.City)
        @Html.ValidationMessageFor(model => model.Address)
        </div>
    </td>
</tr>
<tr>
    <td class="label">@Html.LabelFor(model => model.ContactPerson)</td>
    <td>
        @Html.EditorFor(model => model.ContactPerson)
        @Html.ValidationMessageFor(model => model.ContactPerson)
    </td>
</tr>
<tr>
    <td class="label">@Html.LabelFor(model => model.Telephone)</td>
    <td>
        @Html.EditorFor(model => model.Telephone)
        @Html.ValidationMessageFor(model => model.Telephone)
    </td>
</tr>
<tr>
    <td class="label">@Html.LabelFor(model => model.Mobile)</td>
    <td>
        @Html.EditorFor(model => model.Mobile)
        @Html.ValidationMessageFor(model => model.Mobile)
    </td>
</tr>
<tr>
    <td class="label">@Html.LabelFor(model => model.ComputerNumber)</td>
    <td>
        @Html.EditorFor(model => model.ComputerNumber)
        @Html.ValidationMessageFor(model => model.ComputerNumber)
    </td>
</tr>
<tr>
    <td class="label"></td>
    <td>
        <button type="submit">保存</button>
    </td>
</tr>
</table>
}